	#include("/common/include/include.html")
<div class="admin-main">
	<div class="site-block-full" style="float: left;width: 200px;">
		<ul id="menuTree"></ul>
	</div>
</div>

<script>
layui.config({
	  base: ctx+'/common/js/'
}).use(['tree','ajax'], function(){
		 ajax = layui.ajax;
		 tree = layui.tree;
		var d = ajax.ajaxFunc(ctx+"/admin/menu/getAllMenuTree",null,"json",null);
		layui.tree({
		    elem: '#menuTree' //传入元素选择器
		    ,nodes: d.data
		    ,click: function(node){
		    	//父页面赋值
		    	$(window.parent.document).find("iframe[data-id="+parent.parent.getTabIndex()+"]")[0].contentWindow.setSelectedParent(node);
		    	parent.layer.closeAll();
		    }  
		});
});
</script>